﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace StockConsoleApplication
{
    class Stock
    {
        public string Chsmnt { get; set; }
        public string Beforemnt6 { get; set; }
        public string Beforemnt1 { get; set; }
        public string Aftermnt6 { get; set; }
        public int Chsnum { get; set; }
        public decimal Winrt { get; set; }
        public decimal Losert { get; set; }

        public Stock()
        {
           
        }

        public Stock(string chsmnt)
        {
            this.Chsmnt = chsmnt;
            //得到月份
            DateTime dt = DateTime.Parse(chsmnt);
            this.Beforemnt6 = dt.AddMonths(-6).ToString("yyyy-MM");
            this.Beforemnt1 = dt.AddMonths(-1).ToString("yyyy-MM");
            this.Aftermnt6 = dt.AddMonths(5).ToString("yyyy-MM");
        }

    }
}
